/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Mario Orsi
   This file is part of Brahms.
   Brahms is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   Brahms is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
   You should have received a copy of the GNU General Public License along with Brahms.  If not, see <http://www.gnu.org/licenses/>. */

/* in_namelist.h -- type definitions and operations used to handle input parameters [Rapaport, pp. 495-498] */

typedef enum {N_I, N_R} VType;

/* Macros "NameI" and "NameR" are used to signify real and integer 
   quantities, either single variables or entire structures with 
   all members of that type */
#define NameI( x )  { #x, &x, N_I, sizeof( x ) / sizeof( int ) }
#define NameR( x )  { #x, &x, N_R, sizeof( x ) / sizeof( real ) }

typedef struct {
  char *vName;
  void *vPtr;
  VType vType;
  int vLen, vStatus;
} NameList;

#define ValI( x )  { &x, N_I, sizeof( x ) / sizeof( int ) }
#define ValR( x )  { &x, N_R, sizeof( x ) / sizeof( real ) }

typedef struct {
  void *vPtr;
  VType vType;
  int vLen;
} ValList;

